package com.feel.controller;

import com.feel.pojo.RespBean;
import com.feel.pojo.Type;
import com.feel.service.TypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: 刘永钦
 * @Date: 2024-09-06-9:07
 * @Description:
 */
@RestController
@RequestMapping("/admin/type")
public class TypeController {
    @Autowired
    private TypeService typeService;

    /**
     * 获得服务类型列表
     */
    @GetMapping
    RespBean getAll() {
        List<Type> list = typeService.getAll();
        return  RespBean.ok("查询成功", list);
    }
}
